package com.xdf.xzymanagementsystem.dao;

import com.mybatisflex.core.BaseMapper;
import com.xdf.xzymanagementsystem.entity.OrderFee;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @Description : 由代码生成器生成
 * @Author : chanchaw
 * @Date :  2025-3-22 10:27:04
 */
@Repository
public interface OrderFeeMapper extends BaseMapper<OrderFee> {
    //=================以上是自动生成的代码，自定义代码请写在下面==================
    @Select("select id, DATE_FORMAT(bill_date,'%Y-%m-%d') bill_date, item_name, amount from order_fee where parent_id = #{id} and is_delete = 0")
    List<OrderFee> selectByParentId(Integer id);

    @Select("call usp_order_fee_page(#{sdate},#{edate})")
    List<Map<String, Object>> selectAllByDate(Date sdate, Date edate);
}